import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import java.util.Random;
import java.util.Set;

public class T {
	public static void main(String[] args) {
		Map<String, String> map1 = new LinkedHashMap<String, String>();
		map1.put("1", "1");
		map1.put("2", "2");
		map1.put("3", "3");
		Map<String, String> map2 = new LinkedHashMap<String, String>();
		map2.put("1", "1");
		map2.put("2", "2");
		map2.put("3", "3");
		map2.put("4", "4");
		Map<String, String> mapAll= new LinkedHashMap<String, String>();
		mapAll.putAll(map1);
		mapAll.putAll(map2);
		prt(mapAll);
		
		List<String> l1 = new ArrayList<String>();
		l1.add("1");
		l1.add("2");
		l1.add("3");
		List<String> l2 = new ArrayList<String>();
		l2.add("1");
		l2.add("2");
		l2.add("6");
		l1=null;
		l2.addAll(l1);
		for(String v:l2){
			System.out.println(v);
		}
	}
	public static void prt(Map mapAll) {
		Iterator it1 = null;
		Map.Entry entry = null;
		it1 = mapAll.entrySet().iterator();
		while (it1.hasNext()) {
			entry = (Map.Entry) it1.next();
			System.out.println("key: " + entry.getKey()+"    value:"+entry.getValue());
		}
	
	}
}
